<!DOCTYPE html>
<html lang="en" dir="ltr" class="client-nojs">
<head>
<title>Other operators - cppreference.com</title>
<meta charset="UTF-8">
<meta name="generator" content="MediaWiki 1.21.2">
<link rel="shortcut icon" href="../../../common/favicon.ico">
<link rel="stylesheet" href="../../../common/ext.css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" href="../../../common/site_modules.css">
<style>a:lang(ar),a:lang(ckb),a:lang(fa),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none}#toc{display:none}.editsection{display:none}
/* cache key: mwiki1-mwiki_en_:resourceloader:filter:minify-css:7:472787eddcf4605d11de8c7ef047234f */</style>

<script src="../../../common/startup_scripts.js"></script>
<script>if(window.mw){
mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"c/language/operator_other","wgTitle":"c/language/operator other","wgCurRevisionId":141125,"wgArticleId":9568,"wgIsArticle":true,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Todo with reason"],"wgBreakFrames":false,"wgPageContentLanguage":"en","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgMonthNamesShort":["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"wgRelevantPageName":"c/language/operator_other","wgRestrictionEdit":[],"wgRestrictionMove":[]});
}</script><script>if(window.mw){
mw.loader.implement("user.options",function(){mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"disablesuggest":0,"editfont":"default","editondblclick":0,"editsection":0,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":0,"extendwatchlist":0,"externaldiff":0,"externaleditor":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"imagesize":2,"justify":0,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nocache":0,"noconvertlink":0,"norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"quickbar":5,"rcdays":7,"rclimit":50,"rememberpassword":0,"rows":25,"searchlimit":20,"showhiddencats":0,"showjumplinks":1,"shownumberswatching":1,"showtoc":0,"showtoolbar":1,"skin":"cppreference2","stubthreshold":0,"thumbsize":2,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":0,"watchdefault":0,"watchdeletion":0,
"watchlistdays":3,"watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,"variant":"en","language":"en","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false,"gadget-ColiruCompiler":1,"gadget-MathJax":1});;},{},{});mw.loader.implement("user.tokens",function(){mw.user.tokens.set({"editToken":"+\\","patrolToken":false,"watchToken":false});;},{},{});
/* cache key: mwiki1-mwiki_en_:resourceloader:filter:minify-js:7:9f05c6caceb9bb1a482b6cebd4c5a330 */
}</script>
<script>if(window.mw){
mw.loader.load(["mediawiki.page.startup","mediawiki.legacy.wikibits","mediawiki.legacy.ajax"]);
}</script>
<style type="text/css">/*<![CDATA[*/
.source-c {line-height: normal;}
.source-c li, .source-c pre {
	line-height: normal; border: 0px none white;
}
/**
 * GeSHi Dynamically Generated Stylesheet
 * --------------------------------------
 * Dynamically generated stylesheet for c
 * CSS class: source-c, CSS id: 
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 * --------------------------------------
 */
.c.source-c .de1, .c.source-c .de2 {font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}
.c.source-c  {font-family:monospace;}
.c.source-c .imp {font-weight: bold; color: red;}
.c.source-c li, .c.source-c .li1 {font-weight: normal; vertical-align:top;}
.c.source-c .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}
.c.source-c .li2 {font-weight: bold; vertical-align:top;}
.c.source-c .kw1 {color: #0000dd;}
.c.source-c .kw2 {color: #0000ff;}
.c.source-c .kw3 {color: #0000dd;}
.c.source-c .kw4 {color: #0000ff;}
.c.source-c .co1 {color: #909090;}
.c.source-c .co2 {color: #339900;}
.c.source-c .coMULTI {color: #ff0000; font-style: italic;}
.c.source-c .es0 {color: #008000; font-weight: bold;}
.c.source-c .es1 {color: #008000; font-weight: bold;}
.c.source-c .es2 {color: #008000; font-weight: bold;}
.c.source-c .es3 {color: #008000; font-weight: bold;}
.c.source-c .es4 {color: #008000; font-weight: bold;}
.c.source-c .es5 {color: #008000; font-weight: bold;}
.c.source-c .br0 {color: #008000;}
.c.source-c .sy0 {color: #008000;}
.c.source-c .sy1 {color: #000080;}
.c.source-c .sy2 {color: #000040;}
.c.source-c .sy3 {color: #000040;}
.c.source-c .sy4 {color: #008080;}
.c.source-c .st0 {color: #008000;}
.c.source-c .nu0 {color: #000080;}
.c.source-c .nu6 {color:#000080;}
.c.source-c .nu8 {color:#000080;}
.c.source-c .nu12 {color:#000080;}
.c.source-c .nu16 {color:#000080;}
.c.source-c .nu17 {color:#000080;}
.c.source-c .nu18 {color:#000080;}
.c.source-c .nu19 {color:#000080;}
.c.source-c .ln-xtra, .c.source-c li.ln-xtra, .c.source-c div.ln-xtra {background-color: #ffc;}
.c.source-c span.xtra { display:block; }

/*]]>*/
</style><!--[if lt IE 7]><style type="text/css">body{behavior:url("/mwiki/skins/cppreference2/csshover.min.htc")}</style><![endif]--></head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-c_language_operator_other skin-cppreference2 action-view cpp-navbar">
        <!-- header -->
        <!-- /header -->
        <!-- content -->
<div id="cpp-content-base">
            <div id="content">
                <a id="top"></a>
                <div id="mw-js-message" style="display:none;"></div>
                                <!-- firstHeading -->
<h1 id="firstHeading" class="firstHeading">Other operators</h1>
                <!-- /firstHeading -->
                <!-- bodyContent -->
                <div id="bodyContent">
                                        <!-- tagline -->
                    <div id="siteSub">From cppreference.com</div>
                    <!-- /tagline -->
                                        <!-- subtitle -->
                    <div id="contentSub"><span class="subpages">&lt; <a href="../../c.html" title="c">c</a>‎ | <a href="../language.html" title="c/language">language</a></span></div>
                    <!-- /subtitle -->
                                                            <!-- bodycontent -->
                    <div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><div class="t-navbar" style=""><div class="t-navbar-sep"> </div><div class="t-navbar-head"><a href="../../c.html" title="c"> C</a><div class="t-navbar-menu"><div><div><table class="t-nv-begin" cellpadding="0" style="line-height:1.1em;">
<tr class="t-nv"><td colspan="5"> <a href="../language.html" title="c/language"> Language</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../header.html" title="c/header"> Headers</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../types.html" title="c/types"> Type support</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../program.html" title="c/program"> Program utilities</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../variadic.html" title="c/variadic"> Variadic function support</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../error.html" title="c/error"> Error handling</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../memory.html" title="c/memory"> Dynamic memory management</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../string.html" title="c/string"> Strings library</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../algorithm.html" title="c/algorithm"> Algorithms</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../numeric.html" title="c/numeric"> Numerics</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../chrono.html" title="c/chrono"> Date and time utilities</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../io.html" title="c/io"> Input/output support</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../locale.html" title="c/locale"> Localization support</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../thread.html" title="c/thread"> Concurrency support</a> <span class="t-mark-rev t-since-c11">(C11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../experimental.html" title="c/experimental"> Technical Specifications</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../index.html" title="c/symbol index"> Symbol index</a> </td></tr>
</table></div><div></div></div></div></div><div class="t-navbar-sep"> </div><div class="t-navbar-head"><a href="../language.html" title="c/language"> C language</a><div class="t-navbar-menu"><div><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <a href="basic_concepts.html" title="c/language/basic concepts">Basic concepts</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../keyword.html" title="c/keyword"> Keywords</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../preprocessor.html" title="c/preprocessor"> Preprocessor</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="statements.html" title="c/language/statements"> Statements</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="expressions.html" title="c/language/expressions"> Expressions</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="initialization.html" title="c/language/initialization"> Initialization</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="declarations.html" title="c/language/declarations"> Declarations</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="functions.html" title="c/language/functions"> Functions</a></td></tr>
<tr class="t-nv-h2"><td colspan="5"> Miscellaneous</td></tr>
<tr class="t-nv"><td colspan="5"> <a href="history.html" title="c/language/history"> History of C</a></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../experimental.html" title="c/experimental">Technical Specifications</a> </td></tr>
</table></div><div></div></div></div></div><div class="t-navbar-sep"> </div><div class="t-navbar-head"><a href="expressions.html" title="c/language/expressions"> Expressions</a><div class="t-navbar-menu"><div><div style="display:inline-block">
<div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv-h2"><td colspan="5"> General </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="value_category.html" title="c/language/value category"> value category</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="eval_order.html" title="c/language/eval order"> evaluation order and sequence points</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="constant_expression.html" title="c/language/constant expression">constant expressions</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="conversion.html" title="c/language/conversion">implicit conversions</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="generic.html" title="c/language/generic">generic selection</a></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="expressions.html#Constants_and_literals" title="c/language/expressions">constants and literals</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="integer_constant.html" title="c/language/integer constant"> integer constant</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="floating_constant.html" title="c/language/floating constant"> floating constant</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="character_constant.html" title="c/language/character constant"> character constant</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="string_literal.html" title="c/language/string literal"> string literal</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="compound_literal.html" title="c/language/compound literal"> compound literal</a></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="expressions.html#Operators" title="c/language/expressions">operators</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="operator_precedence.html" title="c/language/operator precedence">operator precedence</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="operator_member_access.html" title="c/language/operator member access">member access and indirection</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="operator_logical.html" title="c/language/operator logical">logical operators</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="operator_comparison.html" title="c/language/operator comparison">comparison operators</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="operator_arithmetic.html" title="c/language/operator arithmetic">arithmetic operators</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="operator_assignment.html" title="c/language/operator assignment">assignment operators</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="operator_incdec.html" title="c/language/operator incdec">increment and decrement</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <strong class="selflink">function call, comma, conditional operator</strong> </td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="sizeof.html" title="c/language/sizeof"><span class="t-lines"><span>sizeof</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="_Alignof.html" title="c/language/ Alignof"><span class="t-lines"><span>_Alignof</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-c11">(C11)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"> <a href="cast.html" title="c/language/cast">cast operators</a> </td></tr>
</table></div>
</div><div></div></div></div></div><div class="t-navbar-sep"> </div></div>
<p>A collection of operators that do not fit into any of the other major categories.
</p>
<table class="metadata plainlinks ambox mbox-small-left ambox-notice" style=""><tr><td class="mbox-empty-cell"></td><td class="mbox-text" style="">This section is incomplete<br>Reason: consider a more general-purpose ToC for this and other tables that cover multiple topics </td></tr></table>
<table class="wikitable" style="font-size:85%;">

<tr style="text-align:center">
<th> Operator
</th>
<th> Operator name
</th>
<th> Example
</th>
<th> Description
</th></tr>
<tr style="text-align:center">
<td> <span class="t-c"><span class="mw-geshi c source-c"><span class="br0">(</span>...<span class="br0">)</span></span></span>
</td>
<td> <a href="operator_other.html#Function_call">function call</a>
</td>
<td> <span class="t-c"><span class="mw-geshi c source-c">f<span class="br0">(</span>...<span class="br0">)</span></span></span>
</td>
<td> call the function <b>f</b>(), with zero or more arguments
</td></tr>
<tr style="text-align:center">
<td> <span class="t-c"><span class="mw-geshi c source-c">,</span></span>
</td>
<td> <a href="operator_other.html#Comma_operator">comma operator</a>
</td>
<td> <span class="t-c"><span class="mw-geshi c source-c">a, b</span></span>
</td>
<td> evaluate expression <b>a</b>, disregard its return value and complete any side-effects, then evaluate expression <b>b</b>, returning the type and the result of this evaluation
</td></tr>
<tr style="text-align:center">
<td> <span class="t-c"><span class="mw-geshi c source-c"><span class="br0">(</span>type<span class="br0">)</span></span></span>
</td>
<td> <a href="cast.html" title="c/language/cast">type cast</a>
</td>
<td> <span class="t-c"><span class="mw-geshi c source-c"><span class="br0">(</span>type<span class="br0">)</span>a</span></span>
</td>
<td> cast the type of <b>a</b> to <b>type</b>
</td></tr>
<tr style="text-align:center">
<td> <span class="t-c"><span class="mw-geshi c source-c"><span class="sy4">?</span> <span class="sy4">:</span></span></span>
</td>
<td> <a href="operator_other.html#Conditional_operator">conditional operator</a>
</td>
<td> <span class="t-c"><span class="mw-geshi c source-c">a <span class="sy4">?</span> b <span class="sy4">:</span> c</span></span>
</td>
<td> if <b>a</b> is logically true (does not evaluate to zero) then evaluate expression <b>b</b>, otherwise evaluate expression <b>c</b>
</td></tr>
<tr style="text-align:center">
<td> <span class="t-c"><span class="mw-geshi c source-c"><span class="kw4">sizeof</span></span></span>
</td>
<td> <a href="sizeof.html" title="c/language/sizeof">sizeof operator</a>
</td>
<td> <span class="t-c"><span class="mw-geshi c source-c"><span class="kw4">sizeof</span> a</span></span>
</td>
<td> the size in bytes of <b>a</b>
</td></tr>
<tr style="text-align:center">
<td> <span class="t-c"><span class="mw-geshi c source-c">_Alignof</span></span> <span class="t-mark-rev t-since-c11">(since C11)</span>
</td>
<td> <a href="_Alignof.html" title="c/language/ Alignof">_Alignof operator</a>
</td>
<td> <span class="t-c"><span class="mw-geshi c source-c">_Alignof<span class="br0">(</span>type<span class="br0">)</span></span></span>
</td>
<td> the alignment required of <b>type</b>
</td></tr></table>
<h3><span class="mw-headline" id="Function_call">Function call</span></h3>
<p>The function call expression has the form 
</p>
<table class="t-sdsc-begin">

<tr>
<td colspan="10" class="t-sdsc-sep">
</td></tr>
<tr class="t-sdsc">
<td class="t-sdsc-nopad"> <span class="t-spar">expression</span> <code><b>(</b></code> <span class="t-spar">argument-list</span><span class="t-mark">(optional)</span> <code><b>)</b></code>
</td>
<td class="t-sdsc-nopad">
</td>
<td class="t-sdsc-nopad">
</td></tr>



<tr>
<td colspan="10" class="t-sdsc-sep">
</td></tr></table>
<p>where 
</p>
<table class="t-par-begin">


<tr class="t-par">
<td> <span class="t-spar">expression</span>
</td>
<td> -
</td>
<td> any expression of pointer-to-function type (after <a href="conversion.html#Lvalue_conversions" title="c/language/conversion">lvalue conversions</a>)
</td></tr>
<tr class="t-par">
<td> <span class="t-spar">argument-list</span>
</td>
<td> -
</td>
<td>  comma-separated list of expressions (which cannot be comma operators) of any complete object type. May be omitted when calling functions that take no arguments.
</td></tr></table>
<p>The behavior of the function call expression depends on whether the prototype of the function being called is <a href="scope.html" title="c/language/scope">in scope</a> at the point of call. 
</p>
<h4><span class="mw-headline" id="Call_to_a_function_with_a_prototype">Call to a function with a prototype</span></h4>
<div class="t-li1"><span class="t-li">1)</span> The number of parameters must equal the number of arguments (unless the ellipsis parameter is used).</div>
<div class="t-li1"><span class="t-li">2)</span> The type of each parameter must be a type such that <a href="conversion.html" title="c/language/conversion">implicit conversion as if by assignment</a> exists that converts the unqualified type of the corresponding argument to the type of the parameter.</div>
 <table class="t-rev-begin">
<tr class="t-rev t-since-c99"><td>
<div class="t-li1"><span class="t-li"></span> Additionally, for every parameter of <a href="array.html" title="c/language/array">array type</a> that uses the keyword <code>static</code> between <code><b>[</b></code> and <code><b>]</b></code>, the argument expression must designate a pointer to the element of an array with at least that many elements as specified in the size expression of the parameter.</div>
</td>
<td><span class="t-mark-rev t-since-c99">(since C99)</span></td></tr>
</table>
<div class="t-li1"><span class="t-li">3)</span> The arguments are evaluated <a href="eval_order.html" title="c/language/eval order">in unspecified order and without sequencing</a>.</div>
<div class="t-li1"><span class="t-li">4)</span> <span class="t-rev-inl t-until-c11"><span><a href="operator_assignment.html" title="c/language/operator assignment">Assignment</a></span> <span><span class="t-mark-rev t-until-c11">(until C11)</span></span></span><span class="t-rev-inl t-since-c11"><span><a href="initialization.html" title="c/language/initialization">Initialization</a></span> <span><span class="t-mark-rev t-since-c11">(since C11)</span></span></span> is performed to copy the value of each argument to the corresponding function parameter (note; the function can modify its parameters, and those changes do not affect the arguments; C function calls are only call-by-value).
<dl><dd><ul><li> if there is a <a href="variadic.html" title="c/language/variadic">trailing ellipsis</a> parameter,  <a href="conversion.html#Default_argument_promotions" title="c/language/conversion">Default argument promotions</a> are performed on the remaining arguments, which are made available to <span class="t-lc">va_list</span>.</li></ul></dd></dl></div>


<div class="t-li1"><span class="t-li">5)</span> Function is executed, and the value it returns becomes the value of the function call expression (if the function returns void, the function call expression is a void expression)
<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="c source-c"><pre class="de1"><span class="kw4">void</span> f<span class="br0">(</span><span class="kw4">char</span><span class="sy2">*</span> p, <span class="kw4">int</span> x<span class="br0">)</span> <span class="br0">{</span><span class="br0">}</span>
<span class="kw4">int</span> main<span class="br0">(</span><span class="kw4">void</span><span class="br0">)</span>
<span class="br0">{</span>
    f<span class="br0">(</span><span class="st0">"abc"</span>, <span class="nu16">3.14</span><span class="br0">)</span><span class="sy4">;</span> <span class="co1">// array to pointer and float to int conversions</span>
<span class="br0">}</span></pre></div></div></div>
<h4><span class="mw-headline" id="Call_to_a_function_without_a_prototype">Call to a function without a prototype</span></h4>
<div class="t-li1"><span class="t-li">1)</span> The arguments are evaluated <a href="eval_order.html" title="c/language/eval order">in unspecified order and without sequencing</a>.</div>
<div class="t-li1"><span class="t-li">2)</span> <a href="conversion.html#Default_argument_promotions" title="c/language/conversion">Default argument promotions</a> are performed on every argument expression.</div>
<div class="t-li1"><span class="t-li">3)</span> <span class="t-rev-inl t-until-c11"><span><a href="operator_assignment.html" title="c/language/operator assignment">Assignment</a></span> <span><span class="t-mark-rev t-until-c11">(until C11)</span></span></span><span class="t-rev-inl t-since-c11"><span><a href="initialization.html" title="c/language/initialization">Initialization</a></span> <span><span class="t-mark-rev t-since-c11">(since C11)</span></span></span> is performed to copy the value of each argument to the corresponding function parameter.</div>
<div class="t-li1"><span class="t-li">4)</span> Function is executed, and the value it returns becomes the value of the function call expression (if the function returns void, the function call expression is a void expression)
<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="c source-c"><pre class="de1"><span class="kw4">void</span> f<span class="br0">(</span><span class="br0">)</span><span class="sy4">;</span> <span class="co1">// no prototype</span>
<span class="kw4">int</span> main<span class="br0">(</span><span class="kw4">void</span><span class="br0">)</span>
<span class="br0">{</span>
    f<span class="br0">(</span><span class="nu0">1</span>, <span class="nu17">1.0f</span><span class="br0">)</span><span class="sy4">;</span> <span class="co1">// UB unless f is defined to take an int and a double</span>
<span class="br0">}</span>
<span class="kw4">void</span> f<span class="br0">(</span><span class="kw4">int</span> a, <span class="kw4">double</span> c<span class="br0">)</span> <span class="br0">{</span><span class="br0">}</span></pre></div></div></div>
<p>The behavior of a function call to a function without a prototype is undefined if
</p>
<ul><li> the number of arguments does not match the number of parameters.
</li><li> the promoted types of the arguments are not <a href="compatible_type.html#Compatible_types" title="c/language/type">compatible</a> with the promoted types of the parameters except that
</li></ul>
<dl><dd><ul><li> signed and unsigned versions of the same integer type are considered compatible if the value of the argument is representable by both types.
</li><li> pointers to void and pointers to (possibly cvr-qualified) character types are considered compatible
</li></ul>
</dd></dl>
<h4><span class="mw-headline" id="Notes">Notes</span></h4>
<p>The evaluations of <span class="t-spar">expression</span> that designates the function to be called and all arguments are <a href="eval_order.html" title="c/language/eval order">unsequenced</a> with respect to each other (but there is a sequence point before the body of the function begins executing)
</p>
<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="c source-c"><pre class="de1"><span class="br0">(</span><span class="sy2">*</span>pf<span class="br0">[</span>f1<span class="br0">(</span><span class="br0">)</span><span class="br0">]</span><span class="br0">)</span> <span class="br0">(</span>f2<span class="br0">(</span><span class="br0">)</span>, f3<span class="br0">(</span><span class="br0">)</span> <span class="sy2">+</span> f4<span class="br0">(</span><span class="br0">)</span><span class="br0">)</span><span class="sy4">;</span> <span class="co1">// f1, f2, f3, f4 may be called in any order</span></pre></div></div>
<p>Although function call is only defined for pointers to functions, it works with function designators due to the <a href="conversion.html#Function_to_pointer_conversion" title="c/language/conversion">function-to-pointer implicit conversion</a>.
</p>
<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="c source-c"><pre class="de1"><span class="kw4">int</span> f<span class="br0">(</span><span class="kw4">void</span><span class="br0">)</span> <span class="br0">{</span> <span class="kw1">return</span> <span class="nu0">1</span><span class="sy4">;</span> <span class="br0">}</span>
<span class="kw4">int</span> <span class="br0">(</span><span class="sy2">*</span>pf<span class="br0">)</span><span class="br0">(</span><span class="kw4">void</span><span class="br0">)</span> <span class="sy1">=</span> f<span class="sy4">;</span>
<span class="kw4">int</span> main<span class="br0">(</span><span class="kw4">void</span><span class="br0">)</span>
<span class="br0">{</span>
    f<span class="br0">(</span><span class="br0">)</span><span class="sy4">;</span>    <span class="co1">// convert f to pointer, then call</span>
    <span class="br0">(</span><span class="sy3">&amp;</span>f<span class="br0">)</span><span class="br0">(</span><span class="br0">)</span><span class="sy4">;</span> <span class="co1">// create a pointer to function, then call</span>
 
    pf<span class="br0">(</span><span class="br0">)</span><span class="sy4">;</span>    <span class="co1">// call the function</span>
    <span class="br0">(</span><span class="sy2">*</span>pf<span class="br0">)</span><span class="br0">(</span><span class="br0">)</span><span class="sy4">;</span> <span class="co1">// obtain the function designator, convert to pointer, then calls</span>
 
    <span class="br0">(</span><span class="sy2">****</span>f<span class="br0">)</span><span class="br0">(</span><span class="br0">)</span><span class="sy4">;</span> <span class="co1">// convert to pointer, obtain the function, repeat 4x, then call</span>
    <span class="br0">(</span><span class="sy2">****</span>pf<span class="br0">)</span><span class="br0">(</span><span class="br0">)</span><span class="sy4">;</span> <span class="co1">// also OK</span>
<span class="br0">}</span></pre></div></div>
<p>Functions that ignore unused arguments, such as <span class="t-lc"><a href="../io/fprintf.html" title="c/io/fprintf">printf</a></span>, must be called with a prototype in scope (the prototype of such functions necessarily uses the <a href="variadic.html" title="c/language/variadic">trailing ellipsis</a> parameter) to avoid invoking undefined behavior.
</p><p>A post-C11 defect report DR 427 changes the semantics of preparing function parameters when calling a function with a prototype from assignment to initialization from their corresponding arguments, in order to allow parameters of const-qualified type (which are <i>de-facto</i> allowed). The permitted implicit conversions remain implicit conversions as if by assignment since that's what <a href="initialization.html" title="c/language/initialization">initialization</a> also uses.
</p>
 <table class="t-rev-begin">
<tr class="t-rev t-until-c99"><td>
<p>A function call expression where <span class="t-spar">expression</span> consists entirely of an identifier and that identifier is undeclared acts as though the identifier is declared as
</p>
<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="c source-c"><pre class="de1"><span class="kw2">extern</span> <span class="kw4">int</span> identifier<span class="br0">(</span><span class="br0">)</span><span class="sy4">;</span> <span class="co1">// returns int and has no prototype</span></pre></div></div>
<p>So the following complete program is valid C89:
</p>
<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="c source-c"><pre class="de1">main<span class="br0">(</span><span class="br0">)</span> <span class="br0">{</span>
    <span class="kw4">int</span> n <span class="sy1">=</span> <a href="../string/byte/atoi.html"><span class="kw541">atoi</span></a><span class="br0">(</span><span class="st0">"123"</span><span class="br0">)</span><span class="sy4">;</span> <span class="co1">// implicitly declares atoi as int atoi()</span>
<span class="br0">}</span></pre></div></div>
</td>
<td><span class="t-mark-rev t-until-c99">(until C99)</span></td></tr>
</table>
<h3><span class="mw-headline" id="Comma_operator">Comma operator</span></h3>
<p>The comma operator expression has the form
</p>
<table class="t-sdsc-begin">

<tr>
<td colspan="10" class="t-sdsc-sep">
</td></tr>
<tr class="t-sdsc">
<td class="t-sdsc-nopad"> <span class="t-spar">lhs</span> <code><b>,</b></code> <span class="t-spar">rhs</span>
</td>
<td class="t-sdsc-nopad">
</td>
<td class="t-sdsc-nopad">
</td></tr>



<tr>
<td colspan="10" class="t-sdsc-sep">
</td></tr></table>
<p>where 
</p>
<table class="t-par-begin">


<tr class="t-par">
<td> <span class="t-spar">lhs</span>
</td>
<td> -
</td>
<td> any expression
</td></tr>
<tr class="t-par">
<td> <span class="t-spar">rhs</span>
</td>
<td> -
</td>
<td> any expression other than another comma operator (in other words, comma operator's <a href="operator_precedence.html" title="c/language/operator precedence">associativity</a> is left-to-right)
</td></tr></table>
<p>First, the left operand, <span class="t-spar">lhs</span>, is evaluated and its result value is discarded.
</p><p>Then, a <a href="eval_order.html" title="c/language/eval order">sequence point</a> takes place, so that all side effects of <span class="t-spar">lhs</span> are complete.
</p><p>Then, the right operand, <span class="t-spar">rhs</span>, is evaluated and its result is returned by the comma operator as a <a href="value_category.html" title="c/language/value category">non-lvalue</a>.
</p>
<h3><span class="mw-headline" id="Notes_2">Notes</span></h3>
<p>The type of the <span class="t-spar">lhs</span> may be <span class="t-c"><span class="mw-geshi c source-c"><span class="kw4">void</span></span></span> (that is, it may be a call to a function that returns <span class="t-c"><span class="mw-geshi c source-c"><span class="kw4">void</span></span></span>, or it can be an expression <a href="cast.html" title="c/language/cast">cast</a> to <span class="t-c"><span class="mw-geshi c source-c"><span class="kw4">void</span></span></span>)
</p><p>The comma operator may be lvalue in C++, but never in C
</p><p>The comma operator may return a struct (the only other expressions that return structs are compound literals, function calls, assignments, and the conditional operator)
</p><p>In the following contexts, the comma operator cannot appear at the top level of an expression because the comma has a different meaning:
</p>
<ul><li> argument list in a function call
</li><li> initializer expression or <a href="initialization.html" title="c/language/initialization">initializer list</a>
</li><li> <a href="generic.html" title="c/language/generic">generic selection</a>
</li></ul>
<p>If the comma operator has to be used in such context, it must be parenthesized:
</p>
<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="c source-c"><pre class="de1"><span class="co1">// int n = 2,3; // error, comma assumed to begin the next declarator</span>
<span class="co1">// int a[2] = {1,2,3}; // error: more initializers than elements</span>
<span class="kw4">int</span> n <span class="sy1">=</span> <span class="br0">(</span><span class="nu0">2</span>,<span class="nu0">3</span><span class="br0">)</span>, a<span class="br0">[</span><span class="nu0">2</span><span class="br0">]</span> <span class="sy1">=</span> <span class="br0">{</span><span class="br0">(</span><span class="nu0">1</span>,<span class="nu0">2</span><span class="br0">)</span>,<span class="nu0">3</span><span class="br0">}</span><span class="sy4">;</span> <span class="co1">// OK</span>
 
f<span class="br0">(</span>a, <span class="br0">(</span>t<span class="sy1">=</span><span class="nu0">3</span>, t<span class="sy2">+</span><span class="nu0">2</span><span class="br0">)</span>, c<span class="br0">)</span><span class="sy4">;</span> <span class="co1">// OK, first, stores 3 in t, then calls f with three arguments</span></pre></div></div>
<p>Top-level comma operator is also disallowed in array bounds
</p>
<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="c source-c"><pre class="de1"><span class="co1">// int a[2,3]; // error</span>
<span class="kw4">int</span> a<span class="br0">[</span><span class="br0">(</span><span class="nu0">2</span>,<span class="nu0">3</span><span class="br0">)</span><span class="br0">]</span><span class="sy4">;</span> <span class="co1">// OK, VLA array of size 3 (VLA because (2,3) is not a constant expression)</span></pre></div></div>
<p>Comma operator is not allowed in <a href="constant_expression.html" title="c/language/constant expression">constant expressions</a>, regardless of whether it's on the top level or not
</p>
<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="c source-c"><pre class="de1"><span class="co1">// static int n = (1,2); // Error: constant expression cannot call the comma operator</span></pre></div></div>
<h3><span class="mw-headline" id="Cast_operator">Cast operator</span></h3>
<p>See <a href="cast.html" title="c/language/cast">cast operator</a>
</p>
<h3><span class="mw-headline" id="Conditional_operator">Conditional operator</span></h3>
<p>The conditional operator expression has the form
</p>
<table class="t-sdsc-begin">

<tr>
<td colspan="10" class="t-sdsc-sep">
</td></tr>
<tr class="t-sdsc">
<td class="t-sdsc-nopad"> <span class="t-spar">condition</span> <code><b>?</b></code> <span class="t-spar">expression-true</span> <code><b>:</b></code> <span class="t-spar">expression-false</span>
</td>
<td class="t-sdsc-nopad">
</td>
<td class="t-sdsc-nopad">
</td></tr>



<tr>
<td colspan="10" class="t-sdsc-sep">
</td></tr></table>
<p>where 
</p>
<table class="t-par-begin">


<tr class="t-par">
<td> <span class="t-spar">condition</span>
</td>
<td> -
</td>
<td> an expression of scalar type
</td></tr>
<tr class="t-par">
<td> <span class="t-spar">expression-true</span>
</td>
<td> -
</td>
<td>  the expression that will be evaluated if condition compares unequal to zero
</td></tr>
<tr class="t-par">
<td> <span class="t-spar">expression-false</span>
</td>
<td> -
</td>
<td>  the expression that will be evaluated if condition compares equal to zero
</td></tr></table>
<p>Only the following expressions are allowed as <span class="t-spar">expression-true</span> and <span class="t-spar">expression-false</span>
</p>
<ul><li> two expressions of any <a href="arithmetic_types.html" title="c/language/arithmetic types">arithmetic type</a>
</li><li> two expressions of the same <a href="struct.html" title="c/language/struct">struct</a> or <a href="union.html" title="c/language/union">union</a> type
</li><li> two expressions of void type
</li><li> two expressions of pointer type, pointing to types that are <a href="compatible_type.html#Compatible_types" title="c/language/type">compatible</a>, ignoring cvr-qualifiers
</li><li> one expression is a pointer and the other is the null pointer constant (such as <span class="t-lc"><a href="../types/NULL.html" title="c/types/NULL">NULL</a></span>)
</li><li> one expression is a pointer to object and the other is a pointer to void (possibly qualified)
</li></ul>
<div class="t-li1"><span class="t-li">1)</span> First, evaluates <span class="t-spar">condition</span>. There is a <a href="eval_order.html" title="c/language/eval order">sequence point</a> after this evaluation.</div>
<div class="t-li1"><span class="t-li">2)</span> If the result of <span class="t-spar">condition</span> compares unequal to zero, executes <span class="t-spar">expression-true</span>, otherwise executes <span class="t-spar">expression-false</span></div>
<div class="t-li1"><span class="t-li">3)</span> Performs a <a href="conversion.html" title="c/language/conversion">conversion</a> from the result of the evaluation to the <i>common type</i>, defined as follows:</div>
<div class="t-li2"><span class="t-li">1)</span> if the expressions have arithmetic type, the common type is the type after <a href="conversion.html#Usual_arithmetic_conversions" title="c/language/conversion">usual arithmetic conversions</a></div>
<div class="t-li2"><span class="t-li">2)</span> if the expressions have struct/union type, the common type is that struct/union type</div>
<div class="t-li2"><span class="t-li">3)</span> if the expressions are both void, the entire conditional operator expression is a void expression</div>
<div class="t-li2"><span class="t-li">4)</span> if one is a pointer and the other is a null pointer constant, the type is the type of that pointer</div>
<div class="t-li2"><span class="t-li">5)</span> if both are pointers, the result is the pointer to the type that combines cvr-qualifiers of both pointed-to types (that is, if one is <span class="t-c"><span class="mw-geshi c source-c"><span class="kw4">const</span> <span class="kw4">int</span><span class="sy2">*</span></span></span> and the other is <span class="t-c"><span class="mw-geshi c source-c"><span class="kw4">volatile</span> <span class="kw4">int</span><span class="sy2">*</span></span></span>, the result is <span class="t-c"><span class="mw-geshi c source-c"><span class="kw4">const</span> <span class="kw4">volatile</span> <span class="kw4">int</span><span class="sy2">*</span></span></span>), and if the types were different, the pointed-to type is the <a href="types.html#Composite_type" title="c/language/types" class="mw-redirect">composite type</a>.</div>
<div class="t-li2"><span class="t-li">6)</span> if one is a pointer to void, the result is a pointer to void with combined cvr-qualifiers</div>
<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="c source-c"><pre class="de1"><span class="co2">#define ICE(x) (sizeof(*(1 ? ((void*)((x) * 0l)) : (int*)1)))</span>
 
<span class="co1">// if x is an Integer Constant Expression then macro expands to</span>
 
 <span class="kw4">sizeof</span><span class="br0">(</span><span class="sy2">*</span><span class="br0">(</span><span class="nu0">1</span> <span class="sy4">?</span> <a href="../types/NULL.html"><span class="kw103">NULL</span></a> <span class="sy4">:</span> <span class="br0">(</span><span class="kw4">int</span> <span class="sy2">*</span><span class="br0">)</span> <span class="nu0">1</span><span class="br0">)</span><span class="br0">)</span>  <span class="co1">// (void *)((x)*0l)) -&gt; NULL</span>
 
<span class="co1">// according to point (4) this further converts into</span>
 
 <span class="kw4">sizeof</span><span class="br0">(</span><span class="kw4">int</span><span class="br0">)</span>
 
<span class="co1">// if x is not an Integer Constant Expression then macro expands to</span>
<span class="co1">// according to point (6)</span>
 
 <span class="br0">(</span><span class="kw4">sizeof</span><span class="br0">(</span><span class="sy2">*</span><span class="br0">(</span><span class="kw4">void</span> <span class="sy2">*</span><span class="br0">)</span><span class="br0">(</span>x<span class="br0">)</span><span class="br0">)</span>           <span class="co1">// Error due incomplete type</span></pre></div></div>
<h4><span class="mw-headline" id="Notes_3">Notes</span></h4>
<p>The conditional operator is never an <a href="value_category.html" title="c/language/value category">lvalue expression</a>, although it may return objects of struct/union type. The only other expressions that may return stucts are <a href="operator_assignment.html" title="c/language/operator assignment">assignment</a>, <a href="operator_other.html#Comma_operator">comma</a>, <a href="operator_other.html#Function_call">function call</a>, and <a href="compound_literal.html" title="c/language/compound literal">compound literal</a>.
</p><p>Note that in C++, it may be an lvalue expression.
</p><p>See <a href="operator_precedence.html" title="c/language/operator precedence">operator precedence</a> for the details on the relative precedence of this operator and assignment.
</p><p>Conditional operator has right-to-left associativity, which allows chaining
</p>
<div dir="ltr" class="mw-geshi" style="text-align: left;"><div class="c source-c"><pre class="de1"><span class="kw1">struct</span> vehicle v <span class="sy1">=</span> arg <span class="sy1">==</span> <span class="st0">'B'</span> <span class="sy4">?</span> bus      <span class="sy4">:</span>
                   arg <span class="sy1">==</span> <span class="st0">'A'</span> <span class="sy4">?</span> airplane <span class="sy4">:</span>
                   arg <span class="sy1">==</span> <span class="st0">'T'</span> <span class="sy4">?</span> train    <span class="sy4">:</span>
                   arg <span class="sy1">==</span> <span class="st0">'C'</span> <span class="sy4">?</span> car      <span class="sy4">:</span>
                   arg <span class="sy1">==</span> <span class="st0">'H'</span> <span class="sy4">?</span> horse    <span class="sy4">:</span>
                                feet<span class="sy4">;</span></pre></div></div>
<h3><span class="mw-headline" id="sizeof_operator">sizeof operator</span></h3>
<p>See <a href="sizeof.html" title="c/language/sizeof">sizeof operator</a>
</p>
<h3><span class="mw-headline" id="Alignof_operator">_Alignof operator</span></h3>
<p>See <a href="_Alignof.html" title="c/language/ Alignof">_Alignof operator</a>
</p>
<h3><span class="mw-headline" id="References">References</span></h3>
<div class="t-ref-std-17">
<ul><li> C17 standard (ISO/IEC 9899:2018): 
</li></ul>
<dl><dd><ul><li> 6.5.2.2 Function calls (p: 58-59)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 6.5.3.4 The sizeof and _Alignof operators (p: 64-65)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 6.5.4 Cast operators (p: 65-66)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 6.5.15 Conditional operator (p: 71-72)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 6.5.17 Comma operator (p: 75)
</li></ul>
</dd></dl>
</div>
<div class="t-ref-std-11">
<ul><li> C11 standard (ISO/IEC 9899:2011): 
</li></ul>
<dl><dd><ul><li> 6.5.2.2 Function calls (p: 81-82)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 6.5.3.4 The sizeof and _Alignof operators (p: 90-91)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 6.5.4 Cast operators (p: 91)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 6.5.15 Conditional operator (p: 100)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 6.5.17 Comma operator (p: 105)
</li></ul>
</dd></dl>
</div>
<div class="t-ref-std-c99">
<ul><li> C99 standard (ISO/IEC 9899:1999): 
</li></ul>
<dl><dd><ul><li> 6.5.2.2 Function calls (p: 71-72)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 6.5.3.4 The sizeof operator (p: 80-81)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 6.5.4 Cast operators (p: 81)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 6.5.15 Conditional operator (p: 90-91)
</li></ul>
</dd></dl>
<dl><dd><ul><li> 6.5.17 Comma operator (p: 94)
</li></ul>
</dd></dl>
</div>
<div class="t-ref-std-c89">
<ul><li> C89/C90 standard (ISO/IEC 9899:1990): 
</li></ul>
<dl><dd><ul><li> 3.3.2.2 Function calls 
</li></ul>
</dd></dl>
<dl><dd><ul><li> 3.3.3.4 The sizeof operator 
</li></ul>
</dd></dl>
<dl><dd><ul><li> 3.3.4 Cast operators 
</li></ul>
</dd></dl>
<dl><dd><ul><li> 3.3.15 Conditional operator 
</li></ul>
</dd></dl>
<dl><dd><ul><li> 3.3.17 Comma operator 
</li></ul>
</dd></dl>
</div>
<h3><span class="mw-headline" id="See_also">See also</span></h3>
<ul><li> <a href="operator_precedence.html" title="c/language/operator precedence">Operator precedence</a>
</li></ul>
<table class="wikitable">

<tr style="text-align:center">
<th colspan="7"> Common operators
</th></tr>
<tr style="text-align:center">
<td> <a href="operator_assignment.html" title="c/language/operator assignment"> assignment</a>
</td>
<td> <a href="operator_incdec.html" title="c/language/operator incdec"> increment<br>decrement</a>
</td>
<td> <a href="operator_arithmetic.html" title="c/language/operator arithmetic"> arithmetic</a>
</td>
<td> <a href="operator_logical.html" title="c/language/operator logical"> logical</a>
</td>
<td> <a href="operator_comparison.html" title="c/language/operator comparison"> comparison</a>
</td>
<td> <a href="operator_member_access.html" title="c/language/operator member access"> member<br>access</a>
</td>
<td> <strong class="selflink"> other</strong>
</td></tr>
<tr style="text-align:center">
<td>
<p><span class="t-c"><span class="mw-geshi c source-c">a <span class="sy1">=</span> b<br>
a <span class="sy2">+</span><span class="sy1">=</span> b<br>
a <span class="sy2">-</span><span class="sy1">=</span> b<br>
a <span class="sy2">*</span><span class="sy1">=</span> b<br>
a <span class="sy2">/</span><span class="sy1">=</span> b<br>
a <span class="sy2">%</span><span class="sy1">=</span> b<br>
a <span class="sy3">&amp;</span><span class="sy1">=</span> b<br>
a <span class="sy3">|</span><span class="sy1">=</span> b<br>
a <span class="sy3">^</span><span class="sy1">=</span> b<br>
a <span class="sy1">&lt;&lt;=</span> b<br>
a <span class="sy1">&gt;&gt;=</span> b</span></span>
</p>
</td>
<td>
<p><span class="t-c"><span class="mw-geshi c source-c"><span class="sy2">++</span>a<br>
<span class="sy2">--</span>a<br>
a<span class="sy2">++</span><br>
a<span class="sy2">--</span></span></span>
</p>
</td>
<td>
<p><span class="t-c"><span class="mw-geshi c source-c"><span class="sy2">+</span>a<br>
<span class="sy2">-</span>a<br>
a <span class="sy2">+</span> b<br>
a <span class="sy2">-</span> b<br>
a <span class="sy2">*</span> b<br>
a <span class="sy2">/</span> b<br>
a <span class="sy2">%</span> b<br>
~a<br>
a <span class="sy3">&amp;</span> b<br>
a <span class="sy3">|</span> b<br>
a <span class="sy3">^</span> b<br>
a <span class="sy1">&lt;&lt;</span> b<br>
a <span class="sy1">&gt;&gt;</span> b</span></span>
</p>
</td>
<td>
<p><span class="t-c"><span class="mw-geshi c source-c"><span class="sy3">!</span>a<br>
a <span class="sy3">&amp;&amp;</span> b<br>
a <span class="sy3">||</span> b</span></span>
</p>
</td>
<td>
<p><span class="t-c"><span class="mw-geshi c source-c">a <span class="sy1">==</span> b<br>
a <span class="sy3">!</span><span class="sy1">=</span> b<br>
a <span class="sy1">&lt;</span> b<br>
a <span class="sy1">&gt;</span> b<br>
a <span class="sy1">&lt;=</span> b<br>
a <span class="sy1">&gt;=</span> b</span></span>
</p>
</td>
<td>
<p><span class="t-c"><span class="mw-geshi c source-c">a<span class="br0">[</span>b<span class="br0">]</span><br>
<span class="sy2">*</span>a<br>
<span class="sy3">&amp;</span>a<br>
a<span class="sy2">-</span><span class="sy1">&gt;</span>b<br>
a.<span class="me1">b</span></span></span>
</p>
</td>
<td>
<p><span class="t-c"><span class="mw-geshi c source-c">a<span class="br0">(</span>...<span class="br0">)</span><br>
a, b<br>
<span class="br0">(</span>type<span class="br0">)</span> a<br>
<span class="sy4">?</span> <span class="sy4">:</span><br>
<span class="kw4">sizeof</span><br>
_Alignof</span></span> <span class="t-mark-rev t-since-c11">(since C11)</span>
</p>
</td></tr>
</table>
<table class="t-dsc-begin">

</table>

<!-- 
NewPP limit report
Preprocessor visited node count: 3897/1000000
Preprocessor generated node count: 11857/1000000
Post‐expand include size: 61220/2097152 bytes
Template argument size: 14246/2097152 bytes
Highest expansion depth: 17/40
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key mwiki1-mwiki_en_:pcache:idhash:9568-0!*!0!!en!*!* and timestamp 20220716132720 -->
</div>                    <!-- /bodycontent -->
                                        <!-- printfooter -->
                    <div class="printfooter">
                    Retrieved from "<a href="https://en.cppreference.com/mwiki/index.php?title=c/language/operator_other&amp;oldid=141125">https://en.cppreference.com/mwiki/index.php?title=c/language/operator_other&amp;oldid=141125</a>"                    </div>
                    <!-- /printfooter -->
                                                            <!-- catlinks -->
                    <!-- /catlinks -->
                                                            <div class="visualClear"></div>
                    <!-- debughtml -->
                                        <!-- /debughtml -->
                </div>
                <!-- /bodyContent -->
            </div>
        </div>
        <!-- /content -->
        <!-- footer -->
        <div id="cpp-footer-base" class="noprint">
            <div id="footer">
                        <div id="cpp-navigation">
            <h5>Navigation</h5>
            <ul><li><a href="https://en.cppreference.com/w/c/language/operator_other">Online version</a></li><li>Offline version retrieved 2022-07-30 14:05.</li></ul></div>
                        <ul id="footer-info">
                                    <li id="footer-info-lastmod"> This page was last modified on 16 July 2022, at 06:27.</li>
                                    <li id="footer-info-viewcount">This page has been accessed 40,602 times.</li>
                            </ul>
                    </div>
        </div>
        <!-- /footer -->
        <script>if(window.mw){
mw.loader.state({"site":"loading","user":"missing","user.groups":"ready"});
}</script>
<script src="../../../common/skin_scripts.js"></script>
<script>if(window.mw){
mw.loader.load(["mediawiki.action.view.postEdit","mediawiki.user","mediawiki.page.ready","mediawiki.searchSuggest","mediawiki.hidpi","ext.gadget.ColiruCompiler","ext.gadget.MathJax"], null, true);
}</script>
<script src="../../../common/site_scripts.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2828341-1']);
_gaq.push(['_setDomainName', 'cppreference.com']);
_gaq.push(['_trackPageview']);
</script><!-- Served in 0.040 secs. -->
	</body>
<!-- Cached 20220716135536 -->
</html>